Skip to content

Conversation

@KhafraDev
Copy link
Member

closes #4801
fixes #4799

KhafraDev and others added 2 commits February 3, 2026 14:25
Co-authored-by: Matteo Collina <hello@matteocollina.com>
controller.abort()

// Erroring a stream (see: https://fetch.spec.whatwg.org/#abort-fetch step 5) does not disturb it.
t.assert.strictEqual(response.bodyUsed, false)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In #4801 Claude, for some reason, thought bodyUsed was true here. All of the other tests are unchanged.

return Promise.reject(new TypeError('Body is unusable: Body has already been read'))
}

if (state.aborted) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

I've wanted to remove this for years

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.25%. Comparing base (dae4d91) to head (de4c41b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/web/fetch/index.js 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4804      +/-   ##
==========================================
+ Coverage   93.24%   93.25%   +0.01%     
==========================================
  Files         109      109              
  Lines       34100    34090      -10     
==========================================
- Hits        31796    31791       -5     
+ Misses       2304     2299       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloning Response change default aborting behavior

3 participants